/*
 * Serum
 *
 * @license      GNU Lesser General Public Licence see LICENCE-LGPL file or http://www.gnu.org/licenses/lgpl.html
 */

/**
 * Request helper
 */
Serum.Helper.StartYear = [];

/**
 * Start year
 *
 * @var     {Number}
 */
Serum.Helper.StartYear.value = null;

/**
 * Returns request id (timestamp)
 *
 * @return  {Integer}   Request id
 */
Serum.Helper.StartYear.yearsList = function() {
    var now = new Date();

    var current = now.getFullYear();
    var years   = [now.getFullYear()];

    if (Serum.Helper.StartYear.value === null) {
        return years;
    }

    while (current > Serum.Helper.StartYear.value) {
        years.push(--current);
    }

    return years;
}